package org.xhy.quickstarter.generator.config;

import com.baomidou.mybatisplus.annotation.DbType;

/**
 * @description: 配置信息
 * @Author: Xhy
 * @gitee: https://gitee.com/XhyQAQ
 * @copyright: B站: https://space.bilibili.com/152686439
 * @CreateTime: 2023-06-04 11:50
 */
public class Config {
    /** 包名：controller */
    public static final String PACKAGE_NAME_CONTROLLER = "controller";

    /** 包名：service */
    public static final String PACKAGE_NAME_SERVICE = "service";

    /** 包名：service.impl */
    public static final String PACKAGE_NAME_SERVICE_IMPL = "service.impl";

    /** 包名：entity */
    public static final String PACKAGE_NAME_MODEL = "entity";

    /** 包名：mapper */
    public static final String PACKAGE_NAME_DAO = "mapper";

    public static final String PACKAGE_NAME_XML = "mapper.xml";

    /** 代码输出目录 */
    public static final String DIR_NAME_DTO = "dto/";
    public static final String DIR_NAME_ENTITY = "entity/";
    public static final String DIR_NAME_VO = "vo/";
    public static final String DIR_NAME_CONTROLLER = "controller/";
    public static final String DIR_NAME_SERVICE = "service/";
    public static final String DIR_NAME_IMPL = DIR_NAME_SERVICE+"impl/";
    public static final String DIR_NAME_MAPPER = "mapper/";
    public static final String DIR_NAME_XML = DIR_NAME_MAPPER+"xml/";

    /** 文件名后缀：Model */
    public static final String FILE_NAME_MODEL = "%s";

    /** 文件名后缀：Mapper */
    public static final String FILE_NAME_DAO = "%sMapper";

    /** 文件名后缀：xml */
    public static final String FILE_NAME_XML = "%sMapper";

    /** MP开头，Service结尾 */
    public static final String FILE_NAME_SERVICE = "%sService";

    /** 文件名后缀：ServiceImpl */
    public static final String FILE_NAME_SERVICE_IMPL = "%sServiceImpl";

    /** 文件名后缀：Controller */
    public static final String FILE_NAME_CONTROLLER = "%sController";

    /** 逻辑删除字段,这里会在对应字段上生成@TableLogic */
    public static final String FIELD_LOGIC_DELETE_NAME = "is_deleted";


    /** 乐观锁字段名 */
    public static final String FIELD_VERSION_NAME = "version";

    /** 模板引擎。velocity / freemarker / beetl */
    public static final String TEMPLATE_ENGINE = "freemarker";

    /** 是否支持Swagger，默认不支持 */
    public static final Boolean SWAGGER_SUPPORT = false;

    /** 表前缀，生成的实体类，不含前缀！！  = 去掉前缀！！！*/
    public static final String[] TABLE_PREFIXES = {"test"};

    /** 字段前缀  不含前缀！！  = 去掉前缀！！！*/
    public static final String[] FIELD_PREFIXES = {"test"};



    /** 作者 */
    public static final String AUTHOR = "xhy";

    /** 基础包名 */
    public static final String PACKAGE_NAME = "org.xhy";

    /**
     * 定制化公司输出目录 controller service mapper
     */
//    public static final String DIR_PARTITION1 = "service\\blade-service\\citms-web\\src\\main\\java\\";
    public static final String DIR_PARTITION1 = "";
    /**
     * 定制化公司输出目录 entity dto vo
     */
//    public static final String DIR_PARTITION2 = "service\\blade-service-api\\citms-web-api\\src\\main\\java\\";
    public static final String DIR_PARTITION2 = "";

    /** 生成文件的输出目录,最好绝对路径,(最主要的改这里就好了,上面的 DIR_PARTITION1和DIR_PARTITION2大家都是一样的)*/
    public static final String PROJECT_PATH = "xxxx";

    /** 输出目录 */
    public static final String OUTPUT_DIR = PROJECT_PATH;

    /** 数据库类型 */
    public static final DbType DB_TYPE = DbType.MYSQL;

    /** 数据库链接 */
    public static final String DB_URL = "jdbc:mysql://127.0.0.1:3306/test?useOldAliasMetadataBehavior=true&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&useSSL=false&characterEncoding=gbk&allowPublicKeyRetrieval=true";

    /** 数据库用户名 */
    public static final String USERNAME = "root";

    /** 数据库密码 */
    public static final String PASSWORD = "123";

    /** 数据库驱动 */
    public static final String DRIVER = "com.mysql.cj.jdbc.Driver";

    /** 表名，为空，生成所有的表 */
    public static final String[] TABLE_NAMES = {"user"};

    /** 剔除公共字段 驼峰命名 */
    public static final String[] COMMON_FIELD = {};

}
